package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Basic_WareHouse", description = "仓库表")
@TableName(value = "Basic_WareHouse")
public class BasicWareHouse extends FBaseEntity implements Serializable {



    @NotBlank(message="[仓库编码]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("仓库编码")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "code")
    private String code;

    @NotBlank(message="[仓库名称]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("仓库名称")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "name")
    private String name;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("仓库地址")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "address")
    private String address;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("仓库联系电话")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "phone")
    private String phone;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("备注")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("仓库位置agv")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "location")
    private String location;

    @NotBlank(message="[仓库类型]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("仓库类型(字典code: f_basic_housetype)")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "wareTypeID")
    @Dict(dictCode = "basic_housetype")
    private String wareTypeID;

    @NotNull(message="[仓库状态]不能为空")
    @ApiModelProperty("仓库状态")
    @TableField(value = "status")
    @Dict(dictCode = "sys_normal_disable")
    private Long status;

    @NotBlank(message="[ERP对应仓库编码]不能为空")
    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("ERP对应仓库编码")
    @Length(max= 500,message="编码长度不能超过500")
    @JsonProperty(value = "eRPStockNumber")
    @TableField(value = "eRPStockNumber")
    private String eRPStockNumber;

    @NotNull(message="[是否上架标记 无需上架的仓库可使用待上架库的物料]不能为空")
    @ApiModelProperty("是否上架标记 无需上架的仓库可使用待上架库的物料")
    @JsonProperty(value = "hSJFlag")
    @TableField(value = "hSJFlag")
    private Long hSJFlag;

    @ApiModelProperty("所属部门ID")
    @TableField(value = "deptId")
    private Long deptId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("库存状态（安全/高于安全库存/低于安全库存）")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "stockStatus")
    private String stockStatus;

    @NotNull(message="[是否先进先出标记]不能为空")
    @ApiModelProperty("是否先进先出标记")
    @JsonProperty(value = "hFIFOFlag")
    @TableField(value = "hFIFOFlag")
    private Long hFIFOFlag;

    @ApiModelProperty("是否参与APS计算标记")
    @JsonProperty(value = "aPSFlag")
    @TableField(value = "aPSFlag")
    private Long aPSFlag;

    @ApiModelProperty("是否倒冲标记")
    @TableField(value = "recoilFlag")
    private Long recoilFlag;

    @ApiModelProperty("是否允许超量入库标记")
    @JsonProperty(value = "inFlag")
    @TableField(value = "inFlag")
    private Long inFlag;

    @ApiModelProperty("是否允许超量领用标记")
    @JsonProperty(value = "outFlag")
    @TableField(value = "outFlag")
    private Long outFlag;






}

